package kislo.dima.task4;

public class Matrix {

	private int[][] array;

	public Matrix(int m, int n) {
		array = new int[m][n];
	}

	public int getRowCount() {
		return array.length;
	}

	public int getColumnCount() {
		return array[0].length;
	}

	public int getElement(int i, int j) {
		return array[i][j];
	}

	public void setElement(int i, int j, int value) {
		array[i][j] = value;
	}

	public String toString() {
		String s = "Matrix [" + array.length + ", " + array[0].length + "]\n";
		for (int[] row : array) {
			for (int value : row)
				s += value + "\t";
			s += "\n";
		}
		return s;
	}

}